{template common/header}
{template user/userheader}
<div class="container mt20">
	<div class="span12 main">
		{template user/usernav}
		<div class="messages">
			<h4 class="mt10 text_c">
			{lang update_album}
			</h4>
         <form id="update_album_form" action="{url home/albumupdate?act=edit}" class="form-horizontal mt10" method="post">
         	<fieldset>
         		<input type="hidden" name="aid" value="{$album['album_id']}"/>
			        <div class="control-group">
			            <label class="control-label" for="category_id">{lang category}</label>
			            <div class="controls">
			            	<select id="category_id" name="category_id" class="span3">
			            	{loop $categories $category}
			            		<option value="{$category['category_id']}" {if $album['category_id']==$category['category_id']}selected{/if}>{$category['category_name_cn']}</option>
			            	{/loop}
			            	</select>
			            </div>
			        </div>
					<div class="control-group">
			            <label class="control-label" for="album_title">{lang album_name}</label>
			            <div class="controls">
			                <input id="album_title" type="text" name="album_title" value="{$album['album_title']}"/>
			            </div>
			        </div>
					<div class="control-group">
			            <label class="control-label" for="album_desc">{lang album_desc}</label>
			            <div class="controls">
			            	<textarea id="album_desc" name="album_desc" rows="6" class="span4">{$album['album_desc']}</textarea>
			            </div>
			        </div>
			        <div class="control-group">
			        	<label class="control-label"></label>
			            <div class="controls">
			            <button type="submit" class="btn btn-primary submit-btn" data-loading-text="{lang tip_loading}">{lang save}</button>
			            </div>
			        </div>
         	</fieldset>
    	</form>
       </div>
	</div>
</div>
<script>
$(document).ready(function() {
	$.oValidate('update_album_form');
});
</script>
{template common/footer}

